<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>div水平布局</title>
    <style>

        body {
            margin: 50px;
            height: 95%;
            width: 95%;
            background-color: black;
        }

        .div-left {
            background-color: yellow;
            width: 30%;
            height: 300px;
            display: block;
            float: left;
        }

        .div-right {
            background-color: blue;
            width: 70%;
            height: 300px;
            display: block;
            float: left;
        }

    </style>
</head>
<body>
<div class="div-left">第一个div</div>
<div class="div-right">第二个div</div>
</body>
</html>